We has poor performance if we try to allocate hundreds of actors;
a bit more ideally, we'd keep pulling as much as we can, but really
no one should have more than 50 in the list as is now except on
unreasonably large screen sizes.
In the future we should change this to be pull-on-demand thing
in a chunked fashion.
https://bugzilla.gnome.org/show_bug.cgi?id=603522
const GenericDisplay = imports.ui.genericDisplay;
const Main = imports.ui.main;
+const MAX_DASH_DOCS = 50;
const DASH_DOCS_ICON_SIZE = 16;
const DEFAULT_SPACING = 4;
// Should be kept alive by the _actorsByUri
this.actor.remove_all();
let docs = this._docManager.getTimestampOrderedInfos();
- for (let i = 0; i < docs.length; i++) {
+ for (let i = 0; i < docs.length && i < MAX_DASH_DOCS; i++) {
let doc = docs[i];
let display = this._actorsByUri[doc.uri];
if (display) {